<div class="tab-content">
    <div class="box border">
        <div class="box-body big">
            <div class="row">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="tabbable">
                            <ul class="nav nav-tabs">
                                <li class="{{activeNumber==1?'active':''}}" ng-click="changeActivityShow(1)"><a><i class="fa fa-home"></i>活动信息查看</a></li>
                                <li class="{{activeNumber==2?'active':''}}" ng-click="changeActivityShow(2)"><a><i class="fa fa-envelope"></i>活动邀请人员动态</a></li>
                                <li class="{{activeNumber==3?'active':''}}" ng-click="changeActivityShow(3)"><a><i class="fa fa-envelope"></i>活动讨论</a></li>
                            </ul>
                            <div ng-show="activeNumber==1" class="tab-content">
                                <table class="table table-hover">
                                    <thead>
                                        <tr>
                                            <th style="width:30%">活动项</th>
                                            <th style="width:70%">活动内容</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>活动名称</td>
                                            <td ng-show="editLine!=1" ng-dblclick="EventDetailEdit(1)" ng-bind="currentEventInfo.name"></td>
                                            <td><input ng-show="editLine==1" id="id1" ng-model="currentEventInfo.name" ng-blur="editLine=-1"></td>
                                        </tr>
                                        <tr>
                                            <td>活动地址</td>
                                            <td ng-show="editLine!=2" ng-dblclick="EventDetailEdit(2)" ng-bind="currentEventInfo.address"></td>
                                            <td><input ng-show="editLine==2" id="id2" ng-model="currentEventInfo.address" ng-blur="editLine=-1"></td>
                                        </tr>
                                        <tr>
                                            <td>开始时间</td>
                                            <td ng-show="editLine!=3" ng-dblclick="EventDetailEdit(3)">{{currentEventInfo.startTime|date:"yyyy-MM-dd HH:mm:ss"}}</td>
                                            <td><input type="datetime-local" ng-show="editLine==3" id="id3" ng-model="currentEventInfo.startTime" ng-blur="editLine=-1" placeholder="IE/FireFox用户请填写形如1970-01-01T00:00:00的时间格式"></td>
                                        </tr>
                                        <tr>
                                            <td>结束时间</td>
                                            <td ng-show="editLine!=4" ng-dblclick="EventDetailEdit(4)">{{currentEventInfo.endTime|date:"yyyy-MM-dd HH:mm:ss"}}</td>
                                            <td><input type="datetime-local" ng-show="editLine==4" id="id4" ng-model="currentEventInfo.endTime" ng-blur="editLine=-1" placeholder="IE/FireFox用户请填写形如1970-01-01T00:00:00的时间格式"></td>
                                        </tr>
                                        <tr>
                                            <td>人数限制</td>
                                            <td ng-show="editLine!=5" ng-dblclick="EventDetailEdit(5)" ng-bind="currentEventInfo.limitNumber"></td>
                                            <td><input ng-show="editLine==5" id="id5" ng-model="currentEventInfo.limitNumber" ng-blur="editLine=-1"></td>
                                        </tr>
                                        <tr>
                                            <td>先决条件</td>
                                            <td ng-show="editLine!=6" ng-dblclick="EventDetailEdit(6)" ng-bind="currentEventInfo.prerequisite"></td>
                                            <td><input ng-show="editLine==6" id="id6" ng-model="currentEventInfo.prerequisite" ng-blur="editLine=-1"></td>
                                        </tr>
                                        <tr>
                                            <td>着装要求</td>
                                            <td ng-show="editLine!=7" ng-dblclick="EventDetailEdit(7)" ng-bind="">{{eventDress_show(currentEventInfo.dressCode)}}</td>
                                            <td>
                                                <select ng-show="editLine==7" id="id7" class="form-control" ng-model="currentEventInfo.dressCode" ng-blur="editLine=-1">
                                                    <option value="CASUAL">休闲</option>
                                                    <option value="BUSINESS_CASUAL">商务休闲</option>
                                                    <option value="BUSINESS_FORMAL">商务正装</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>状态</td>
                                            <td ng-show="editLine!=8" ng-dblclick="EventDetailEdit(8)">{{eventStatus_show(currentEventInfo.status)}}</td>
                                            <td><select ng-show="editLine==8" id="id8" ng-model="currentEventInfo.status" class="form-control" ng-blur="editLine=-1">
                                                    <option value="DRAFT">草稿</option>
                                                    <option value="CONFIRM">确认</option>
                                                    <option value="CANCEL">取消</option>
                                                    <option value="CLOSED">关闭</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>类型</td>
                                            <td ng-show="editLine!=9" ng-dblclick="EventDetailEdit(9)">{{eventType_show(currentEventInfo.type)}}</td>
                                            <td>
                                                <select ng-show="editLine==9" id="id9" class="form-control" ng-model="currentEventInfo.type" ng-blur="editLine=-1">
                                                    <option value="CEREMONY">典礼</option>
                                                    <option value="MEETING">会议</option>
                                                    <option value="DINNER">聚餐</option>
                                                    <option value="SPORTS">体育</option>
                                                    <option value="ART">艺术</option>
                                                    <option value="PARTY">派对</option>
                                                    <option value="TRAINING">培训</option>
                                                    <option value="OUTING">户外运动</option>
                                                    <option value="SEMINAR">研讨会</option>
                                                    <option value="RELEASE">发布会</option>
                                                    <option value="CONCALL">电话会议</option>
                                                    <option value="TOURS">旅行</option>
                                                    <option value="OTHERS">其他</option>
                                                </select>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="row" style="position:center">
                                    <button class="btn btn-success" ng-click="updateEventToDatebase()">更新</button>
                                </div>
                            </div>
                            <div ng-show="activeNumber==2" class="tab-content">
                                <div class="row" style="text-align: center">
                                    <input class="form-group" readonly="readonly" ng-model="contactNameList">
                                    <button class="btn btn-success" ng-click="AddCandidateUsers()">邀请新好友</button>
                                </div>
                                <table class="table table-hover">
                                    <thead>
                                        <tr>
                                            <th>被邀请人姓名</th>
                                            <th>被邀请人状态</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-repeat="item in candidateUserInCurrentEvent">
                                            <td>{{contactNameShowOne(item.candidateId)}}</td>
                                            <td>{{userEnrollStatus_show(item.enrollStatus)}}</td>
                                            <td><a ng-click="cancalThisCandidateUser(item.id)">取消邀请此好友</a></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div ng-show="activeNumber==3" class="tab-content">
                                <div style="overflow: auto;height: 400px">
                                    <table class="table table-hover">
                                        <thead>
                                        <tr>
                                            <th ng-click="col='name';desc=!desc">讨论人</th>
                                            <th ng-click="col='content';desc=!desc">讨论内容</th>
                                            <th ng-click="col='time';desc=!desc">发表时间</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr ng-repeat="item in commentsForCurrentEvent|orderBy:col:desc">
                                            <td ng-bind="item.createdBy"></td>
                                            <td ng-bind="item.content"></td>
                                            <td>{{item.createdDate|date:"yyyy-mm-dd HH:mm:ss"}}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <p style="text-align: center" ng-show="commentsForCurrentEvent.length==0">暂时还没有活动参与者进行评论，快来抢占沙发吧！</p>
                                <div class="row" style="text-align: center">
                                    <input ng-model="newComment.content"/>
                                    <button class="btn btn-success" ng-click="submitComment()">发表评论</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
